import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { ACLGuard } from '@delon/acl';
import { StudentCourseViewComponent } from 'src/app/project/component/icm-student-academic/student-course/student-course-view.component';
import { ScoreEntryViewComponent } from 'src/app/project/component/icm-student-academic/score-entry/score-entry-view.component';
import { StudentScoreViewComponent } from 'src/app/project/component/icm-student-academic/student-score/student-score-view.component';
import { ComprehensiveEvaluationViewComponent } from 'src/app/project/component/icm-student-academic/comprehensive-evaluation/comprehensive-evaluation-view.component';
import { AcademicStatisticsViewComponent } from 'src/app/project/component/icm-student-academic/academic-statistics/academic-statistics-view.component';
import { ConsolidatedResultsViewComponent } from 'src/app/project/component/icm-student-academic/consolidated-results/consolidated-results-view.component';
import { NotificationInformationViewComponent } from 'src/app/project/component/icm-student-academic/notification-information/notification-information-view.component';

const routes: Routes = [
  {
    path: 'student-course',
    canActivate: [ACLGuard],
    component: StudentCourseViewComponent,
    data: {
      title: '学生选课',
      reuse: true,
      guard: {
        role: ['ROLE_STUDENT'],
      },
    },
  },
  {
    path: 'student-score-entry',
    canActivate: [ACLGuard],
    component: ScoreEntryViewComponent,
    data: {
      title: '学生成绩录入',
      reuse: true,
      guard: {
        role: ['ROLE_TEACHER'],
      },
    },
  },
  {
    path: 'student-score',
    canActivate: [ACLGuard],
    component: StudentScoreViewComponent,
    data: {
      title: '学生成绩查询',
      reuse: true,
      guard: {
        role: ['ROLE_STUDENT'],
      },
    },
  },
  {
    path: 'comprehensive-evaluation',
    canActivate: [ACLGuard],
    component: ComprehensiveEvaluationViewComponent,
    data: {
      title: '综合测评',
      reuse: true,
      guard: {
        role: ['ROLE_STUDENT', 'ROLE_CLASS_EVALUATION_ADMIN', 'ROLE_INSTRUCTOR'],
      },
    },
  },
  {
    path: 'academic-statistics',
    canActivate: [ACLGuard],
    component: AcademicStatisticsViewComponent,
    data: {
      title: '学业进展统计',
      reuse: true,
      guard: {
        role: ['ROLE_INSTRUCTOR'],
      },
    },
  },
  {
    path: 'consolidated-results',
    canActivate: [ACLGuard],
    component: ConsolidatedResultsViewComponent,
    data: {
      title: '综合成绩统计',
      reuse: true,
      guard: {
        role: ['ROLE_INSTRUCTOR'],
      },
    },
  },
  {
    path: 'notification-information',
    canActivate: [ACLGuard],
    component: NotificationInformationViewComponent,
    data: {
      title: '通知管理',
      reuse: true,
      guard: {
        role: ['ROLE_INSTRUCTOR'],
      },
    },
  },
];
@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class StudentAcademicRoutingModule {}
